The cover of an electronic device such as a smartphone, a tablet personal computer (PC), or the like may be used to safely protect the electronic device from external shock. Also, the cover has been recently used as an accessory that expresses the personality of a user. In addition, with the development of a technology for implementing various functions of the electronic device, a technology for implementing various functions with the cover has been developed.
The electronic device may include a connector that connects the electronic device to the cover, and may determine whether the cover is mounted, based on a voltage level of a specific terminal of the connector. The opening/closing state of the cover after the cover is mounted may be determined by using a hall effect integrated circuit (IC) that determines whether a magnet located in the cover approaches the electronic device.